<template>
    <view class="user-page">
        <loading v-show="loading"></loading>
        <user v-show="!loading" @setLoading='setLoading' :isOnShow='isOnShow' @setIsOnShow="setIsOnShow"></user>
        <tabBar :selected='0'></tabBar>
    </view>
</template>

<script>
    // 底部导航栏
    import tabBar from '@/components/custom/tabBar.vue'
    import user from '@/components/user/index.vue'

    // 加载组件 && 加载混合剂
    import loading from '@/components/custom/loading.vue'
    import {
        loadingMixin
    } from '@/mixins/loading'

    export default {
        mixins: [loadingMixin],
        components: {
            tabBar,
            user,
            loading,
        },
        data() {
            return {
                isOnShow: false,
            }
        },
        onShow() {
            this.setIsOnShow(true)
        },
        methods: {
            setIsOnShow(isOnShow) {
                this.isOnShow = isOnShow
            },
        },
    }
</script>

<style>
</style>